<?php
class Signup extends cl_BasePage {
	
	public $signupform;
	
  function __construct() { 
  	
    parent::__construct();
    $this->title = "Signup | CulturaLive.com | it_IT"; 
  }
  
  function doInit() {
  	parent::doInit();
  	
  	global $teardrop;
  	$this->signupform = new Signup_Form($teardrop->sysroot."/app/signup/form.phtml");
  
  }
  
  
  function doValidate() {  
  	
  	$this->signupform->doValidate();  	
  		
  }
  
  
  function verify($key) {
  	global $teardrop;
  	
  	$utility = new cl_Utility();
  	$username = $utility->verify_key($key, $this->sql_con);
  	
  	if ($username) {
  		$this->setUsername($username);
  		$teardrop->route("completesignup.htm");
  	}
  	else {
  		trigger_error("Can't verify subscription.", E_USER_ERROR);
    }
  	
  }
}
?>
